package com.ruoyi.reunion.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reunion.mapper.ActivityParticipantMapper;
import com.ruoyi.reunion.domain.ActivityParticipant;
import com.ruoyi.reunion.service.IActivityParticipantService;

/**
 * 活动参与人员Service业务层处理
 * 
 * @author ccccc
 * @date 2025-04-09
 */
@Service
public class ActivityParticipantServiceImpl implements IActivityParticipantService 
{
    @Autowired
    private ActivityParticipantMapper activityParticipantMapper;

    /**
     * 查询活动参与人员
     * 
     * @param id 活动参与人员主键
     * @return 活动参与人员
     */
    @Override
    public ActivityParticipant selectActivityParticipantById(Long id)
    {
        return activityParticipantMapper.selectActivityParticipantById(id);
    }

    /**
     * 查询活动参与人员列表
     * 
     * @param activityParticipant 活动参与人员
     * @return 活动参与人员
     */
    @Override
    public List<ActivityParticipant> selectActivityParticipantList(ActivityParticipant activityParticipant)
    {
        return activityParticipantMapper.selectActivityParticipantList(activityParticipant);
    }

    /**
     * 新增活动参与人员
     * 
     * @param activityParticipant 活动参与人员
     * @return 结果
     */
    @Override
    public int insertActivityParticipant(ActivityParticipant activityParticipant)
    {
        activityParticipant.setCreateTime(DateUtils.getNowDate());
        return activityParticipantMapper.insertActivityParticipant(activityParticipant);
    }

    /**
     * 修改活动参与人员
     * 
     * @param activityParticipant 活动参与人员
     * @return 结果
     */
    @Override
    public int updateActivityParticipant(ActivityParticipant activityParticipant)
    {
        activityParticipant.setUpdateTime(DateUtils.getNowDate());
        return activityParticipantMapper.updateActivityParticipant(activityParticipant);
    }

    /**
     * 批量删除活动参与人员
     * 
     * @param ids 需要删除的活动参与人员主键
     * @return 结果
     */
    @Override
    public int deleteActivityParticipantByIds(Long[] ids)
    {
        return activityParticipantMapper.deleteActivityParticipantByIds(ids);
    }

    /**
     * 删除活动参与人员信息
     * 
     * @param id 活动参与人员主键
     * @return 结果
     */
    @Override
    public int deleteActivityParticipantById(Long id)
    {
        return activityParticipantMapper.deleteActivityParticipantById(id);
    }
}
